// dfs 
function maxDfs() {
    let ret = 1
    function dfs(root, depth) {
        if (!root.left && !root.right) ret = Math.max(ret, depth)
        if (root.left) dfs(root.left, depth + 1)
        if (root.right) dfs(root.right, depth + 1)
    }
    dfs(root, ret)
    return ret
}